package com.addplus.townmall.server.scheduled.scheduletask;

import com.addplus.townmall.server.api.mapper.town.ShopProductFightMapper;
import com.addplus.townmall.server.api.mapper.town.ShopProductMapper;
import com.addplus.townmall.server.api.mapper.town.ShopSpecificationSkuMapper;
import com.addplus.townmall.server.api.model.town.ShopProduct;
import com.addplus.townmall.server.api.model.town.ShopProductFight;
import com.addplus.townmall.server.api.model.town.ShopSkuModel;
import com.addplus.townmall.server.api.model.town.ShopSpecificationSku;
import com.addplus.townmall.server.api.mongodao.ShopSkuModelDao;
//import com.addplus.townmall.server.api.service.rest.globalsearchmodule.SolrService;
import com.addplus.townmall.server.api.utils.date.DateUtils;
import com.alibaba.dubbo.config.annotation.Reference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.mongodb.morphia.query.Query;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class SolrTask {

    private Logger logger = LoggerFactory.getLogger(UpdateCommentTask.class);

//    @Reference(check = false)
//    private SolrService solrService;

    /**
     * 同步solr索引库
     * @throws Exception
     */
//    @Scheduled(cron = "0 0 0/1 * * ? ")
//    public void updateSolr() throws Exception{
//        for (int i = 1; i < 6; i++) {
//            solrService.synchronizeSolrModel(i);
//        }
//    }
}
